//
//  HMHomeToplistModel.m
//  HowToDo
//
//  Created by Stan on 2017-01-05.
//  Copyright © 2017 KY. All rights reserved.
//

#import "HMHomeToplistModel.h"
#import <YYModel.h>
#import "HMNetWorkTool.h"

@implementation HMHomeToplistModel

+ (void)loadHomeToplistDataFinished:(void(^)(id responseObject))completedBlock Failed:(void(^)(NSError* error))failedBlock{
    
//    数据转模型
    [[HMNetWorkTool sharedTool]requestHomeToplistDataFinished:^(id responseObject) {
        if ([responseObject isKindOfClass:[NSDictionary class]]) {
            NSArray *toplistArray = [NSArray yy_modelArrayWithClass:[HMHomeToplistModel class] json:responseObject[@"data"]];
            completedBlock(toplistArray);
        }
        
    } Failed:^(NSError *error) {
        HMLog(@"error = %@",error);
 
        
    }];
}
@end
